/*
** my_putnbr.c for lib in /home/boulah_m//jour_11
**
** Made by moustafa boulahia
** Login   <boulah_m@epitech.net>
**
** Started on  Mon Oct 24 13:56:20 2011 moustafa boulahia
** Last update Tue Jan 31 12:32:46 2012 moustafa boulahia
*/
#include "my.h"

int	my_putnbr(int nb)
{
  int	save;
  int	div;

  div = 1;
  if (nb <0)
    {
      my_putchar('-');
      nb = -nb;
    }
  while ((nb/div) >= 10)
    {
      div = div * 10;
    }
  while (div >= 1)
    {
      save = nb % div;
      nb = nb/ div;
      my_putchar(nb + '0');
      nb = save;
      div = div / 10;
    }
  return (0);
}

